openapi: 3.0.3
info:
  version: 3.0.0
  title: API for cash declaration
  description: >-
    Manage cash declarations or cash disclosures in CIS CASH application. All
    fields specified as required may not be empty unless explicitly mentioned.
  contact:
    name: The OLAF Team
    email: OLAF-AFIS-IT-HELP-DESK@ec.europa.eu
servers:
  - url: 'http://localhost:8080'
    description: Local
  - url: 'https://api-qa02.olaf.europa.eu'
    description: Conformance
  - url: 'https://api.olaf.europa.eu'
    description: Production
security:
  - CisCashAuth:
      - 'cashdeclaration:read'
      - 'cashdeclaration:create'
tags:
  - name: cashdeclarations
    description: Cash Declarations
  - name: legacy cashdeclarations
    description: Legacy B2B Cash Declarations
paths:
  /api/cashdeclarations/search:
    post:
      tags:
        - cashdeclarations
      summary: Search cash declarations
      description: >-
        The service endpoint searches for matching cash declarations in AFIS CIS
        CASH system based on complex criteria complying to EU regulation
        2018/1672
      operationId: searchCashDeclarations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CashDeclarationSearchRequest'
            examples:
              example1:
                $ref: '#/components/examples/CashDeclarationSearchRequest'
      responses:
        '200':
          description: List of cash declarations found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashDeclarationSearchResponse'
              examples:
                example1:
                  $ref: '#/components/examples/CashDeclarationSearchResponse'
        '400':
          description: >-
            response in case of validation errors due to syntactical errors in
            the input
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Requested resource is not found
        '422':
          description: >-
            response in case of validation errors due to business rule
            violations
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '500':
          description: response in case of errors
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: service is not available
      security:
        - CisCashAuth:
            - 'cashdeclaration:read'
  '/api/cashdeclarations/{id}':
    get:
      tags:
        - cashdeclarations
      summary: Fetch a cash declaration
      description: >-
        The service endpoint retrieves a cash declaration from AFIS CIS CASH
        system complying to EU regulation 2018/1672.
      operationId: getById
      parameters:
        - name: id
          in: path
          description: business Id of the cash declaration to fetch
          required: true
          style: simple
          explode: false
          schema:
            maxLength: 25
            type: string
        - name: Accept-Language
          in: header
          description: Preferred language of the connected user. Default value 'en'
          required: false
          style: simple
          explode: false
          schema:
            type: string
            default: en
            enum:
              - bg
              - cs
              - da
              - de
              - el
              - en
              - es
              - et
              - fi
              - fr
              - ga
              - hr
              - hu
              - it
              - lt
              - lv
              - mt
              - nl
              - pl
              - pt
              - ro
              - sk
              - sl
              - sv
      responses:
        '200':
          description: Cash declaration successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashDeclarationGetResponse'
              examples:
                example1:
                  $ref: '#/components/examples/CashDeclarationGetResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Requested resource is not found
        '500':
          description: response in case of errors
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: service is not available
      security:
        - CisCashAuth:
            - 'cashdeclaration:read'
  /api/cashdeclarations:
    post:
      tags:
        - cashdeclarations
      summary: Create a cash declaration
      description: >-
        The service endpoint registers a new cash declaration in AFIS CIS CASH
        system complying to EU regulation 2018/1672
      operationId: create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CashDeclaration'
            examples:
              example1:
                $ref: '#/components/examples/CashDeclarationNew'
        required: true
      responses:
        '201':
          description: Cash declaration successfully created
          headers:
            Location:
              description: A URI reference pointing to the created resource.
              style: simple
              explode: false
              schema:
                type: string
        '400':
          description: >-
            response in case of validation errors due to syntactical errors in
            the input
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Requested resource is not found
        '422':
          description: >-
            response in case of validation errors due to business rule
            violations
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '500':
          description: response in case of errors
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: service is not available
      security:
        - CisCashAuth:
            - 'cashdeclaration:create'
  /api/cashdeclarations/count:
    post:
      tags:
        - cashdeclarations
      summary: Count cash declarations
      description: >-
        The service endpoint counts matching cash declarations in AFIS CIS CASH
        system based on complex criteria complying to EU regulation 2018/1672
      operationId: countCashDeclarations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CashDeclarationCountRequest'
            examples:
              example1:
                $ref: '#/components/examples/CashDeclarationCountRequest'
      responses:
        '200':
          description: Count of cash declarations found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CashDeclarationCountResponse'
              examples:
                example1:
                  $ref: '#/components/examples/CashDeclarationCountResponse'
        '400':
          description: >-
            response in case of validation errors due to syntactical errors in
            the input
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Requested resource is not found
        '422':
          description: >-
            response in case of validation errors due to business rule
            violations
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ValidationProblemDetails'
                  - required:
                      - validationErrors
                    type: object
                    properties:
                      validationErrors:
                        type: array
                        description: The list of validation errors.
                        items:
                          $ref: '#/components/schemas/CashDeclarationValidationError'
                    description: ''
        '500':
          description: response in case of errors
          content:
            application/problem+json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ProblemDetails'
        '503':
          description: service is not available
      security:
        - CisCashAuth:
            - 'cashdeclaration:read'
  /afis/api/v1/cashdeclaration:
    post:
      tags:
        - legacy cashdeclarations
      summary: Create a cash declaration
      description: >-
        (Legacy B2B API) The service endpoint registers a new cash declaration
        in AFIS CIS CASH system.
      operationId: createCashDeclaration
      parameters:
        - name: Accept-Language
          in: header
          description: Preferred language of the connected user. Default value 'en'
          required: false
          style: simple
          explode: false
          schema:
            type: string
            default: en
            enum:
              - bg
              - cs
              - da
              - de
              - el
              - en
              - es
              - et
              - fi
              - fr
              - ga
              - hr
              - hu
              - it
              - lt
              - lv
              - mt
              - nl
              - pl
              - pt
              - ro
              - sk
              - sl
              - sv
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LegacyCashDeclarationObject'
            examples:
              example1:
                $ref: '#/components/examples/LegacyCashDeclarationNew'
        required: true
      responses:
        '201':
          description: Cash declaration successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyCashDeclarationObject'
        '400':
          description: >-
            Business validation errors/ incorrect parameters. The content
            contains the details of the error (wrong fields, reasons)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Requested resource is not found
        '500':
          description: 'Internal server error, retry later'
        '503':
          description: service is not available
      deprecated: true
      security:
        - CisCashAuth:
            - 'cashdeclaration:create'
components:
  schemas:
    CashDeclarationSearchRequest:
      description: >-
        Definition of a search query including pagination, sorting and search
        criteria
      allOf:
        - $ref: '#/components/schemas/SearchRequest'
        - type: object
          properties:
            sort:
              maxItems: 9
              type: array
              items:
                $ref: '#/components/schemas/CashDeclarationSearchSort'
            criteria:
              $ref: '#/components/schemas/CashDeclarationSearchCriteria'
    CashDeclarationSearchSort:
      title: CashDeclarationSearchSort
      allOf:
        - $ref: '#/components/schemas/Sort'
        - type: object
          properties:
            orderBy:
              type: string
              description: By which property (see enum below) the result should be sorted
              default: publicationDate
              enum:
                - nationalRef
                - movementType
                - declarationType
                - publicationDate
                - departureCountry
                - destinationCountry
                - meansOfTransport
                - totalAmountEuro
                - businessId
    CashDeclarationSearchCriteria:
      allOf:
        - $ref: '#/components/schemas/Criteria'
        - type: object
          properties:
            nationalRef:
              maxLength: 100
              minLength: 3
              pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
              type: string
              description: >-
                Allows to select the cash declarations with National reference
                number provided by the Customs authority.
            declarationType:
              $ref: '#/components/schemas/DeclarationType'
            movementType:
              $ref: '#/components/schemas/MovementType'
            businessId:
              maxLength: 100
              minLength: 3
              type: string
              description: >-
                Business-id of the created declaration in the CIS+ system. The
                value is returned by the CIS+ system and shall not be specified
                by the caller e.g. DEC-BE-20200215-102430125
            declarationCountry:
              maxLength: 2
              pattern: '^[A-Z]{2}$'
              type: string
              description: >-
                ISO 3166-1 alpha-2 code for member states (including 'XI' for
                Northern Island), except for Great Britain where UK must be
                used.
            declarationDateFrom:
              type: string
              description: >-
                Allows to select the declarations declared from the specified
                date in format YYYY-MM-DD.
              format: date
            declarationDateTo:
              type: string
              description: >-
                Allows to select the declarations declared up to the specified
                date in format YYYY-MM-DD.
              format: date
            publicationDateFrom:
              type: string
              description: >-
                Allows to select the declarations published in CIS from the
                specified date in format YYYY-MM-DD.
              format: date
            publicationDateTo:
              type: string
              description: >-
                Allows to select the declarations published in CIS up to the
                specified date in format YYYY-MM-DD.
              format: date
            lastUpdateDateFrom:
              type: string
              description: >-
                Allows to select the declarations last updated in CIS from the
                specified date in format YYYY-MM-DD.
              format: date
            lastUpdateDateTo:
              type: string
              description: >-
                Allows to select the declarations last updated in CIS up to the
                specified date in format YYYY-MM-DD.
              format: date
            cashType:
              $ref: '#/components/schemas/CashType'
            customsOfficeRef:
              maxLength: 100
              minLength: 2
              pattern: '^$|[A-Z0-9]+'
              type: string
              description: >-
                Allows to select the declarations based on the customs office
                reference number. The reference number
                (https://ec.europa.eu/taxation_customs/dds2/col/col_home.jsp?Lang=en)
                e.g. BE100100 should be used.
            meansOfTransport:
              maxItems: 6
              type: array
              description: >-
                Allows to select the declarations based on the means of
                transport.
              items:
                $ref: '#/components/schemas/TypeOfTransport'
            totalAmountEuroFrom:
              minimum: 0
              type: number
              description: >-
                allows to search declarations with total amount Euro (with 2
                decimals) equaling or more than specified value.
            totalAmountEuroTo:
              minimum: 0
              type: number
              description: >-
                allows to search declarations with total amount Euro (with 2
                decimals) up to the specified value.
            intendedUses:
              maxItems: 14
              type: array
              description: >-
                allows to search declarations with any of the intended uses of
                the cash.
              items:
                $ref: '#/components/schemas/IntendedUse'
            provenances:
              maxItems: 11
              type: array
              description: >-
                allows to search declarations with any of the economic
                provenances of the cash.
              items:
                $ref: '#/components/schemas/Provenance'
            companyCriteria:
              $ref: '#/components/schemas/CompanySearchCriteria'
            personCriteria:
              $ref: '#/components/schemas/PersonSearchCriteria'
            routingCriteria:
              $ref: '#/components/schemas/RoutingSearchCriteria'
            infractionCriteria:
              $ref: '#/components/schemas/InfractionSearchCriteria'
          description: Search criteria to retrieve published cash declarations.
    DeclarationType:
      type: string
      description: >
        Type of cash declaration i.e. either for accompanied cash (cash
        declaration) or either for unaccompanied cash (cash disclosure).

        * DECLAR: Cash declaration for accompanied cash

        * DISCLO: Cash disclosure for unaccompanied cash
      enum:
        - DECLAR
        - DISCLO
    MovementType:
      type: string
      description: >
        Type of cash movement i.e. the movement is entering the EU or leaving
        the EU.

        * ENTERING: Entering community

        * LEAVING: Leaving community
      enum:
        - ENTERING
        - LEAVING
    CashType:
      type: string
      description: >
        Type of cash as mentioned in regulation EU 2018/1672.

        * BANKNOTE: Currency - Bank notes

        * COIN: Currency - Coins

        * TRAVCHEQUE: Bearer-negotiable Instruments - Traveller's cheques

        * CHEQUE: Bearer-negotiable Instruments - Cheques

        * PROMNOTES: Bearer-negotiable Instruments - Promissory notes

        * MONEYORDER: Bearer-negotiable Instruments - Money orders

        * GCOIN: Commodities used as highly-liquid stores of value - Gold coins

        * BAR: Commodities used as highly-liquid stores of value - Gold bars

        * NUGGET: Commodities used as highly-liquid stores of value - Gold
        nuggets

        * CLUMP: Commodities used as highly-liquid stores of value - Gold clumps

        * OTHER: Other type of cash (prepaid cards...)
      enum:
        - BANKNOTE
        - COIN
        - TRAVCHEQUE
        - CHEQUE
        - PROMNOTES
        - MONEYORDER
        - GCOIN
        - BAR
        - NUGGET
        - CLUMP
        - OTHER
    TypeOfTransport:
      type: string
      description: |
        * SEA: Sea
        * RAIL: Rail
        * ROAD: Road
        * AIR: Air
        * COURIER: Courier/Post
        * OTHER: Other
      enum:
        - SEA
        - RAIL
        - ROAD
        - AIR
        - COURIER
        - OTHER
    IntendedUse:
      type: string
      description: >
        * LABEXPEN: Labour expenses (salary payments, investment business etc)

        * CAPINVES: Capital investment (deposit to bank, insurance payment etc)

        * ACQUESTA: Funds for acquiring real estate

        * ACQUPROP: Funds for acquiring moveable property

        * REPAPERS: Repayment of loan granted by a natural person

        * REPAINST: Repayment of loan granted by a legal entity (credit
        institution, bank or company)

        * LOTTGAMB: Lottery and gambling

        * SHIPMAST: Cash to shipmaster/board cash

        * CHARITY:  Charity

        * VACATION: Vacation/Recreation - To be used for cash declaration only

        * BANKTRAN: Shipment between financial institutions - To be used for
        Cash disclosure only

        * TRANCASH: Transfer of cash by professional cash couriers (currency
        exchange companies) - To be used for cash declaration only

        * TRANOTHE: Transfer of cash by professional cash couriers (other) - To
        be used for Cash declaration only

        * OTHER: Other (specify)
      enum:
        - REPAPERS
        - REPAINST
        - CAPINVES
        - ACQUPROP
        - ACQUESTA
        - LOTTGAMB
        - LABEXPEN
        - SHIPMAST
        - CHARITY
        - VACATION
        - BANKTRAN
        - TRANCASH
        - TRANOTHE
        - OTHER
    Provenance:
      type: string
      description: >
        * LABOPROF: Labour profits (income, retirement, income from
        entrepreneurship etc)

        * INVESTPR: Capital profits (dividends, investment profits, interest,
        insurance payments etc)

        * SALEESTA: Sale of real estate

        * SALEPROP: Sale of movable property

        * LOANPERS: Loan granted by another natural person

        * LOANINST: Loan granted by legal entity (credit institution, bank or
        company)

        * LOTTERY:  Lottery/gambling

        * GIFTDONA: Gift/donation

        * BANKTRAN: Shipment between financial institutions - To be used for
        Cash disclosure only

        * INHERTAN: Inheritance

        * OTHER: Other to specify
      enum:
        - LOANPERS
        - LOANINST
        - INVESTPR
        - SALEPROP
        - SALEESTA
        - LOTTERY
        - LABOPROF
        - GIFTDONA
        - BANKTRAN
        - INHERTAN
        - OTHER
    CompanySearchCriteria:
      type: object
      properties:
        name:
          maxLength: 100
          minLength: 3
          type: string
          description: >-
            Name of the company. The search uses the operator 'contains' (case
            insensitive).
        city:
          maxLength: 100
          minLength: 3
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            city name. The search uses the operator 'contains' (case
            insensitive).
        country:
          maxLength: 2
          pattern: '^[A-Z]{2}$'
          type: string
          description: >-
            allows to search declarations based on country address of company.
            The value is expected to be an ISO 3166-1 alpha-2 code for
            countries.
        registrationNumber:
          maxLength: 50
          minLength: 3
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            allows to search declarations that contain (case insensitive) the
            given value in the company registration number.
      description: Search criteria to retrieve cash declarations using company attributes.
    PersonSearchCriteria:
      type: object
      properties:
        firstName:
          maxLength: 100
          minLength: 2
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            allows to search declarations that contain (case insensitive) the
            given value in the first name of the person.
        lastName:
          maxLength: 100
          minLength: 2
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            allows to search declarations that contain (case insensitive) the
            given value in the family name of the person.
        nationality:
          maxLength: 2
          pattern: '^[A-Z]{2}$'
          type: string
          description: >-
            allows to search declarations based on nationality of person. The
            value is expected to be an ISO 3166-1 alpha-2 code for countries
            (except UK for Great Britain)
        city:
          maxLength: 100
          minLength: 3
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            allows to search declarations that contain (case insensitive) the
            given value in the person's city name.
        country:
          maxLength: 2
          pattern: '^[A-Z]{2}$'
          type: string
          description: >-
            allows to search declarations based on country address of person.
            The value is expected to be an ISO 3166-1 alpha-2 code for countries
            (except UK for Great Britain)
        identificationNumber:
          maxLength: 50
          minLength: 3
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: >-
            allows to search declarations based on identification number. The
            search uses the contains operator.
      description: Search criteria to retrieve cash declarations using person attributes.
    RoutingSearchCriteria:
      type: object
      properties:
        step:
          $ref: '#/components/schemas/RoutingStep'
        country:
          maxItems: 20
          type: array
          description: Allows to search using the routing country
          items:
            maxLength: 2
            pattern: '^[A-Z]{2}$'
            type: string
            description: >-
              ISO 3166-1 alpha-2 code except for Great Britain where UK must be
              used signifying the country of the movement.
      description: >-
        Search criteria used to retrieve cash declarations using routing
        attributes.
    RoutingStep:
      type: string
      description: >
        Routing step related to the transport movement from departure to
        destination including transit (if available). If there are several
        transits, several routing steps need to be specified. Only one routing
        step DEPART and one routing step DESTIN are allowed. The routing step
        TRANSI and LANDBO must be used only for cash declaration. The routing
        steps must be specified in chronological order.

        * DEPART: Departure

        * TRANSI: Transit (Only for cash declaration)

        * LANDBO: Land border crossing (Used for road transport in cash
        declaration only)

        * ARRIVA: Arrival/final destination
      enum:
        - DEPART
        - TRANSI
        - LANDBO
        - ARRIVA
    InfractionSearchCriteria:
      type: object
      properties:
        infraction:
          type: boolean
          description: To indicate if infraction exists or not
        nonDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Non declaration
        incorrectDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg.
            2018/1672. Incorrect/incomplete declaration
        cashNotAvailable:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Cash not available for control
        criminalActivity:
          type: boolean
          description: >-
            Indications that cash is related any criminal activity (articles 6,
            10(1)(c), 10(2))
        detention:
          type: boolean
          description: Indication that cash is detained
        penaltyStarted:
          type: boolean
          description: Indication that Penalty proceeding has been started
        modusOperandi:
          maxItems: 6
          type: array
          description: >-
            Allows to search cash declarations with infraction using the modus
            operandi.
          items:
            $ref: '#/components/schemas/ModusOperandi'
        concealmentType:
          maxItems: 12
          type: array
          description: >-
            Allows to search cash declarations with infractions using the
            concealment type.
          items:
            $ref: '#/components/schemas/ConcealmentType'
      description: >-
        Search criteria used to retrieve cash declarations using infraction
        attributes.
    ModusOperandi:
      type: string
      description: |
        Modus operandi used for the infraction.
        * FALSVO: False declaration of value (over evaluation)
        * FALSVU: False declaration of value (under evaluation)
        * FALSEI: Presentation of false/irregular documents
        * TERROFIN: Suspicion of terrorism financing
        * MONEYL: Money laundering
        * OTHER: Other (specify)
      enum:
        - FALSVO
        - FALSVU
        - FALSEI
        - TERROFIN
        - MONEYL
        - OTHER
    ConcealmentType:
      type: string
      description: |
        Concealment type used during the infraction.
        * PERSBODY: On the persons - on the body
        * PERSCLOT: On the persons - in clothing
        * PERSSHOE: On the persons - in shoes
        * PERSSTUF: On the persons - stuffed
        * PERSSWAL: On the persons - swallowed
        * HANDLUGG: In hand luggage
        * CHECLUGG: In checked luggage
        * MEANSTR: In means of transport
        * CONSIGNE: In consignments
        * RECEPTAC: In receptacles
        * NOTCONCE: Not concealed
        * OTHER: Other (specify)
      enum:
        - PERSBODY
        - PERSCLOT
        - PERSSHOE
        - PERSSTUF
        - PERSSWAL
        - HANDLUGG
        - CHECLUGG
        - MEANSTR
        - CONSIGNE
        - RECEPTAC
        - NOTCONCE
        - OTHER
    CashDeclarationSearchResponse:
      allOf:
        - $ref: '#/components/schemas/SearchResponse'
        - type: object
          properties:
            records:
              maxItems: 100
              type: array
              items:
                $ref: '#/components/schemas/CashDeclarationSearchRecord'
    CashDeclarationSearchRecord:
      title: CashDeclarationSearchRecord
      type: object
      properties:
        nationalRef:
          maxLength: 100
          type: string
          description: National reference number provided by the Customs authority.
        movementType:
          $ref: '#/components/schemas/MovementType'
        declarationType:
          $ref: '#/components/schemas/DeclarationType'
        publicationDate:
          type: string
          description: >-
            Date when the declaration has been published in the CIS application.
            Date format YYYY-MM-DD
          format: date
        departureCountry:
          maxLength: 2
          type: string
          description: The departure country.
        destinationCountry:
          maxLength: 2
          type: string
          description: The destination country.
        meansOfTransport:
          maxLength: 10
          type: string
          description: The mean of transport.
        totalAmountEuro:
          type: number
          description: >-
            Total amount EURO of all cash details (with 2 decimals) in the
            declaration.
        businessId:
          maxLength: 25
          type: string
          description: business id of the cash declaration
    CashDeclarationValidationError:
      description: >-
        This object is used within CashDeclarationValidationProblemDetails and
        describes a validation error.
      allOf:
        - $ref: '#/components/schemas/ValidationError'
        - required:
            - reason
          type: object
          properties:
            reason:
              maxLength: 4000
              type: string
              description: validation error description
    ValidationProblemDetails:
      title: ValidationProblemDetails
      description: >-
        A container object specific for validation errors. Please look at the
        provided example how to populate this object. The type, title and status
        as given in the example must be used. The details and instance
        attributes should not be populated as the validationErrors attribute
        contains all necessary information about the problem.
      example:
        type: 'https://api.afis.europa.eu/errors/validation-error'
        title: The provided input fails one ore more business validation rules.
        status: '422'
        validationErrors:
          - field: 'person, company'
            description: >-
              At least one person or one company must be specified in the
              ex-officio declaration.
          - field: amount
            description: The amount must not be negative.
      allOf:
        - $ref: '#/components/schemas/ProblemDetails'
        - required:
            - validationErrors
          type: object
          properties:
            validationErrors:
              type: array
              description: The list of validation errors.
              items:
                $ref: '#/components/schemas/ValidationError'
    ProblemDetails:
      title: Problem details
      type: object
      properties:
        type:
          maxLength: 256
          type: string
          description: >-
            A URI reference providing a human readable description of the
            problem type.
          default: 'about:blank'
        title:
          maxLength: 256
          type: string
          description: 'A short, human-readable summary of the problem type.'
        status:
          type: integer
          description: The HTTP status code for this occurrence of the problem.
        detail:
          maxLength: 4000
          type: string
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
        instance:
          maxLength: 256
          type: string
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem. It may or may not yield further information if
            de-referenced.
      description: >-
        The ProblemDetails object, as described in RFC7807. Can be extended to
        provide more specific contextual information.
      example:
        type: 'https://api-errors.afis.europa.eu/internal-server-error'
        title: An internal error has occurred.
        status: 500
        detail: >-
          If applicable and the problem persists, please contact technical
          support providing the unique identifier.
        instance: the uuid that can be used to contact technical support
    ValidationError:
      title: Validation error
      required:
        - reason
      type: object
      properties:
        field:
          maxLength: 100
          type: string
          description: >-
            The name of the field that the validation error applies to. Can be
            empty if the validation error is more generic about the whole
            object. Can contain multiple field names (comma-separated) if the
            validation problem spans multiple fields.
        reason:
          maxLength: 4000
          type: string
          description: >-
            A human readable description of the validation error, allowing the
            client to figure the problem.
      description: >-
        Object used within ValidationProblemDetails and describes a validation
        error.
      example:
        field: name
        reason: field is mandatory
    CashDeclarationGetResponse:
      description: Response with content of existing cash declaration for Get API
      allOf:
        - $ref: '#/components/schemas/CashDeclaration'
        - type: object
          properties:
            lastUpdateDate:
              type: string
              description: >-
                Date in format YYYY-MM-DD in the UTC timezone. Only populated in
                case the cash declaration has been updated after publishing.
                Only for GET operation.
              format: date
              readOnly: true
    CashDeclaration:
      required:
        - customsDeclaration
        - customsOfficeRef
        - declarationDate
        - declarationPlace
        - declarationType
        - endorsedCopyRequested
        - meansOfTransport
        - movementType
        - nationalRef
        - totalCash
      type: object
      properties:
        customsOfficeRef:
          maxLength: 8
          pattern: '^$|^[A-Z]{2}[A-Z0-9]{6}$'
          type: string
          description: >-
            Customs office reference number. The reference number
            (https://ec.europa.eu/taxation_customs/dds2/col/col_home.jsp?Lang=en)
            e.g. BE100100 should be used.
        declarationType:
          $ref: '#/components/schemas/DeclarationType'
        declarationTypeDescription:
          maxLength: 255
          type: string
          description: >-
            textual description of the type of declaration. Only for GET
            operation.
          readOnly: true
        movementType:
          $ref: '#/components/schemas/MovementType'
        movementTypeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the code related to movementType in the user
            language. Only for GET operation.
          readOnly: true
        nationalRef:
          maxLength: 100
          type: string
          description: >-
            National reference number provided by the Customs authority. The
            reference must be unique per Member State.
        declarationDate:
          type: string
          description: >-
            Date of the declaration in format YYYY-MM-DD in the UTC timezone
            established by the carrier or the declarant of the cash.
          format: date
        publicationDate:
          type: string
          description: >-
            Date in format YYYY-MM-DD in the UTC timezone when the declaration
            has been published in CIS. Only for GET operation.
          format: date
          readOnly: true
        declarationPlace:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Town/country where the declaration has been established.
        businessId:
          maxLength: 25
          type: string
          description: >-
            Business-id of the created declaration in the CIS+ system. The value
            is returned by the CIS+ system and shall not be specified by the
            caller e.g. DEC-BE-20200215-102430125
          readOnly: true
        declarationOwner:
          maxLength: 255
          type: string
          description: >-
            Organisation who created the cash declaration. Only for GET
            operation.
          readOnly: true
        persons:
          maxItems: 40
          type: array
          description: >-
            List of persons involved in the cash declaration or cash disclosure
            i.e. carrier, declarant, sender, owners and recipients.
          items:
            $ref: '#/components/schemas/Person'
        companies:
          maxItems: 40
          type: array
          description: >-
            List of legal entities (companies) involved in the cash declaration
            or cash disclosure i.e. owners or recipients of the cash.
          items:
            $ref: '#/components/schemas/Company'
        totalCash:
          $ref: '#/components/schemas/Cash'
        meansOfTransport:
          $ref: '#/components/schemas/MeansOfTransport'
        customsDeclaration:
          type: boolean
          description: >-
            Customs declaration for commodities used as highly-liquid store of
            value.
        customsDeclarationNumber:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: >-
            Customs declaration number (for commodities used as high-liquid
            stores of value).
        endorsedCopyRequested:
          type: boolean
          description: Endorsed copy requested by the carrier or declarant.
        infraction:
          $ref: '#/components/schemas/Infraction'
      description: >-
        This is the main object representing either a cash declaration
        (accompanied cash) or a cash disclosure  (unaccompanied cash)
    Person:
      required:
        - address
        - firstName
        - gender
        - identificationDocuments
        - involvements
        - lastName
        - nationality
        - placeOfBirth
      type: object
      properties:
        involvements:
          maxItems: 7
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/PersonInvolvementType'
        involvementsDescription:
          maxItems: 7
          type: array
          items:
            maxLength: 255
            type: string
            description: Textual description of the code related to the involvements
            readOnly: true
        firstName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: First name(s) of the person.
        lastName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Last name(s) of the person.
        nationality:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the nationality of the person.
        nationalityDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
        gender:
          $ref: '#/components/schemas/GenderType'
        genderDescription:
          maxLength: 255
          type: string
          description: Textual description of the gender code. Only for GET operation.
          readOnly: true
        dateOfBirth:
          type: string
          description: Date of birth in format YYYY-MM-DD.
          format: date
          nullable: true
        placeOfBirth:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Place of birth.
        address:
          $ref: '#/components/schemas/Address'
        phone:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9()+ \/\-]+'
          type: string
        email:
          maxLength: 254
          pattern: ^$|.+@.+\..+
          type: string
          description: email of the person (compliant to RFC822)
        identificationDocuments:
          maxItems: 2
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/IdentificationDocument'
        partOfCash:
          $ref: '#/components/schemas/Cash'
      description: Person involved in the cash movement
    PersonInvolvementType:
      type: string
      description: >
        Roles of a person in the cash movement i.e. carrier or owner or
        recipient or declarant or sender. Multiple values are possible.

        * CARRIER: Carrier (cash declaration)

        * OWNER: Owner (cash declaration and cash disclosure declaration)

        * RECIP: Recipient (cash declaration and cash disclosure declaration)

        * DECLAR: Declarant (cash disclosure declaration)

        * SENDER: Sender (cash disclosure declaration)

        * SENDEREP: Representative of the sender (cash disclosure declaration)

        * RECIPREP: Representative of the recipient (cash disclosure
        declaration)
      enum:
        - CARRIER
        - OWNER
        - RECIP
        - DECLAR
        - SENDER
        - SENDEREP
        - RECIPREP
    GenderType:
      type: string
      description: |
        Gender
        * MALE: Male
        * FEMALE: Female
        * OTHERGEN: Other
        * UNKNOW: Unknown
      enum:
        - MALE
        - FEMALE
        - OTHERGEN
        - UNKNOW
    Address:
      required:
        - city
        - country
      type: object
      properties:
        street:
          maxLength: 255
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: street name and house/building number.
        postalCode:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: postal code
        city:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: city name.
        country:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying code of the country.
        countryDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
      description: physical address of a person or a company
    IdentificationDocument:
      required:
        - number
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/IdentificationDocumentType'
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the identification type code. Only for GET
            operation.
          readOnly: true
        otherType:
          maxLength: 50
          type: string
          description: >-
            Other type of document used to identify a person. (Used only for
            type = OTHER)
        number:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Identification number.
        dateOfIssue:
          type: string
          description: Date of issue of the identification document in format YYYY-MM-DD.
          format: date
          nullable: true
        countryOfIssue:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the country of issue of the document.
        countryOfIssueDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
      description: >-
        Identification  of a person. This includes also the personal
        identification number.
    IdentificationDocumentType:
      type: string
      description: |
        Document identifying a person.
          * IDCARD: Person ID-Card
          * PASSPORT: Passport
          * PERSID: Personal Identification number
          * OTHER: Other to specify
      enum:
        - IDCARD
        - PASSPORT
        - PERSID
        - OTHER
    Cash:
      required:
        - cashDetails
      type: object
      properties:
        intendedUses:
          maxItems: 14
          type: array
          description: Intended uses of the cash.
          items:
            $ref: '#/components/schemas/IntendedUse'
        intendedUsesDescription:
          maxItems: 14
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the codes related to intendedUses. Only for
              GET operation.
            readOnly: true
        otherIntendedUse:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other intended use of the cash (use only for intendedUse = OTHER)
        provenances:
          maxItems: 11
          type: array
          description: Economic provenances of the cash. At least one value is mandatory.
          items:
            $ref: '#/components/schemas/Provenance'
        provenancesDescription:
          maxItems: 11
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the code related to provenances. Only for
              GET operation.
            readOnly: true
        otherProvenance:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: >-
            Other economic provenance of the cash (use only for provenance =
            OTHER)
        cashDetails:
          maxItems: 160
          minItems: 1
          type: array
          description: Type of cash and associated amounts & currency.
          items:
            $ref: '#/components/schemas/CashDetail'
      description: >-
        Details of the cash i.e. intended uses, provenances and type of cash.
        The cash can be either the total declared cash (carried by the carried
        or declared by the declarant) or a part of it specific to an
        owner/recipient when there are more than one owner/recipient in the
        declaration.
    CashDetail:
      required:
        - amount
        - amountEuro
        - cashType
        - currency
      type: object
      properties:
        cashType:
          $ref: '#/components/schemas/CashType'
        cashTypeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the code related to cash type. Only for GET
            operation.
          readOnly: true
        otherCashType:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: >-
            Other type of cash e.g. prepaid card. (use only for cashType =
            OTHER)
        amount:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: Amount of cash (with 2 decimals).
        currency:
          maxLength: 3
          pattern: '^$|^[A-Z]{3}$'
          type: string
          description: ISO 4217 code for the currency used.
        currencyDescription:
          maxLength: 255
          type: string
          description: Description of the currency used.
          readOnly: true
        amountEuro:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: Amount converted in Euro (with 2 decimals).
        quantity:
          maximum: 99999999999999
          minimum: 0
          type: integer
          description: Number of items. Only for commodities.
          format: int64
        weight:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: >-
            Total weight in grams (with 2 decimals) (for cash type
            COMMODITY|GCOIN, COMMODITY|BAR, COMMODITY|NUGGET, COMMODITY|CLUMP).
            Only for commodities.
      description: >-
        Detailed description of the cash type and cash content (amount and
        currency)
    Company:
      required:
        - address
        - involvements
        - name
        - registrationCountry
        - registrationName
        - registrationNumber
      type: object
      properties:
        involvements:
          maxItems: 3
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/CompanyInvolvementType'
        involvementsDescription:
          maxItems: 3
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the involvement codes. Only for GET
              operation.
            readOnly: true
        name:
          maxLength: 255
          type: string
          description: Name of the company.
        address:
          $ref: '#/components/schemas/Address'
        registrationNumber:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Company registration number
        registrationName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Name of register
        registrationCountry:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the registration country of the company.
        registrationCountryDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
        vatNumber:
          maxLength: 15
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Company VAT number
        eoriNumber:
          maxLength: 17
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Company EORI number (2 letters and max 15 digits)
        phone:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9()+ \/\-]+'
          type: string
          description: Fixed phone number of the company.
        email:
          maxLength: 254
          pattern: ^$|.+@.+\..+
          type: string
          description: Email of the company (compliant to RFC822)
        partOfCash:
          $ref: '#/components/schemas/Cash'
      description: Company involved in the cash movement
    CompanyInvolvementType:
      type: string
      description: >
        Roles of a company in the cash movement.

        * OWNER: Owner of the cash (cash declaration and cash disclosure
        declaration)

        * SENDER: Sender of the cash (cash disclosure declaration)

        * RECIP: Recipient of the cash (cash declaration and cash disclosure
        declaration)
      enum:
        - OWNER
        - SENDER
        - RECIP
    MeansOfTransport:
      required:
        - routings
        - typeOfTransport
      type: object
      properties:
        typeOfTransport:
          type: string
          description: Type of transport.
          enum:
            - AIR
            - SEA
            - RAIL
            - ROAD
            - COURIER
            - OTHER
        routings:
          maxItems: 20
          minItems: 2
          type: array
          description: >-
            Itinerary of the cash. This includes the departure, arrival and
            optionally transits.
          items:
            $ref: '#/components/schemas/Routing'
      description: Transport.
      discriminator:
        propertyName: typeOfTransport
        mapping:
          AIR: '#/components/schemas/Air'
          SEA: '#/components/schemas/Vessel'
          RAIL: '#/components/schemas/Rail'
          ROAD: '#/components/schemas/Road'
          COURIER: '#/components/schemas/Courier'
          OTHER: '#/components/schemas/OtherTransport'
    Routing:
      required:
        - country
        - step
      type: object
      properties:
        step:
          $ref: '#/components/schemas/RoutingStep'
        stepDescription:
          maxLength: 255
          type: string
          description: Textual description of the step code. Only for GET operation.
          readOnly: true
        country:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the country of the movement.
        countryDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
        place:
          maxLength: 7
          type: string
          description: >-
            UN Location code of the airport/port/station/land border crossing
            point. If not known, use the value 'UNKNOWN'. For a free text, use
            the value 'OTHER'. Used for cash declaration only.
        placeDescription:
          maxLength: 255
          type: string
          description: >-
            Name of the location without diacritics signs as specified in the
            UN/LOCODE standard. Only for GET operation.
        otherPlace:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Free text for other place when place = OTHER
        routingDate:
          type: string
          description: >-
            Date of the movement (YYYY-MM-DD) for departure,
            arrival/destination, land border crossing or transit. Used for cash
            declaration only.
          format: date
          nullable: true
    Air:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AirTransportType'
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the air passenger type's code. Only for GET
            operation.
          readOnly: true
        flightNumber:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Commercial flight number.
        registrationNumber:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: registration number of the private jet.
      description: >-
        Details for air transport (Used for cash declaration only. Must remain
        empty for cash disclosure). One of flightNumber or registrationNumber
        must be specified.
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    AirTransportType:
      type: string
      description: |
        Transport by passenger aircraft, business jet or other.
        * PASAIR: Commercial flight
        * BUSJET: Private jet
        * OTHER: Other
      enum:
        - PASAIR
        - BUSJET
        - OTHER
    Vessel:
      type: object
      properties:
        vesselName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Name of vessel name + name of the shipping line.
        vesselType:
          $ref: '#/components/schemas/VesselType'
        vesselTypeDescription:
          maxLength: 255
          type: string
          description: Textual description of the vessel code. Only for GET operation.
          readOnly: true
      description: >-
        Details for transport by sea/river (Used for cash declaration only. Must
        remain empty for cash disclosure).
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    VesselType:
      type: string
      description: |
        Transport by vessel i.e. commercial, yacht, cruise, other.
        * COM: commercial vessel
        * YACHT: Yacht
        * CRUISE: Cruise vessel
        * OTHER: Other
      enum:
        - COM
        - YACHT
        - CRUISE
        - OTHER
    Rail:
      type: object
      properties:
        company:
          maxLength: 50
          type: string
          description: Train company.
        number:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Train number.
      description: >-
        Details for rail transport (Used for cash declaration only. Must remain
        empty for cash disclosure)
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    Road:
      type: object
      properties:
        nationality:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the vehicle registration country.
        nationalityDescription:
          maxLength: 255
          type: string
          description: Textual description of the country code. Only for GET operation.
          readOnly: true
        licensePlate:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Registrered licence plate of the vehicle.
        vehicleType:
          $ref: '#/components/schemas/VehicleType'
        vehicleTypeDescription:
          maxLength: 255
          type: string
          description: Textual description of the vehicle's code. Only for GET operation.
          readOnly: true
      description: >-
        Details for road transport (only for cash declaration only. Must remain
        empty for cash disclosure)
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    VehicleType:
      type: string
      description: |
        Type of transport by road i.e. truck, car, bus, other.
        * LORRY: truck
        * PRICAR: car
        * BUS: bus
        * OTHER: Other
      enum:
        - LORRY
        - PRICAR
        - BUS
        - OTHER
    Courier:
      required:
        - type
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CourierType'
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the couriertype's code. Only for GET
            operation.
          readOnly: true
      description: Details for courier/post transportation.
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    CourierType:
      type: string
      description: >
        Transport by Post (postal package) or by express courier (courier
        shipment).

        * EXPCOU: Express courier shipment

        * POST: Postal package
      enum:
        - EXPCOU
        - POST
    OtherTransport:
      required:
        - type
      type: object
      properties:
        type:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
      description: 'Details of other means of transport e.g. bicycle, pedestrian'
      allOf:
        - $ref: '#/components/schemas/MeansOfTransport'
    Infraction:
      required:
        - belowThreshold
        - cashNotAvailable
        - concealmentType
        - controlDate
        - criminalActivity
        - detention
        - euFinancialEffect
        - incorrectDeclaration
        - modusOperandi
        - nonDeclaration
        - penaltyStarted
        - remedy
        - thirdCountry
      type: object
      properties:
        controlDate:
          type: string
          description: date of the control in format YYYY-MM-DD.
          format: date
        incorrectDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with articles 5(3) Reg.
            2018/1672. Incorrect/incomplete declaration
        nonDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Non declaration
        cashNotAvailable:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Cash not available for control
        belowThreshold:
          type: boolean
          description: >-
            Information obtained in accordance with articles 6(1) or 6(2) Reg
            2018/1672 for cash below threshold of 10000 EUR where there are
            indication that cash is related to criminal activity.
        criminalActivity:
          type: boolean
          description: Indications that cash is related to criminal activity
        euFinancialEffect:
          type: boolean
          description: >-
            Indications that cash is related to criminal activity which could
            adversely affect the financial interests of the union.
        detention:
          type: boolean
        remedy:
          type: boolean
        penaltyStarted:
          type: boolean
          description: Penalty proceeding started
        concealmentType:
          maxItems: 12
          minItems: 1
          uniqueItems: true
          type: array
          description: Different concealment types used during the infraction.
          items:
            $ref: '#/components/schemas/ConcealmentType'
        concealmentTypeDescription:
          maxItems: 12
          type: array
          description: >-
            Textual description of the different concealment types used during
            the infraction. Only for GET operation.
          readOnly: true
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the concealment type code. Only for GET
              operation.
            readOnly: true
        otherConcealmentType:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other type of concealment
        concealmentDetails:
          maxLength: 255
          pattern: '^$|[\t -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾₠-⃏\‘\’\“\”\–]+'
          type: string
          description: Details of the concealment
        modusOperandi:
          maxItems: 6
          minItems: 1
          uniqueItems: true
          type: array
          description: Different modus operandi used during the infraction.
          items:
            $ref: '#/components/schemas/ModusOperandi'
        modusOperandiDescription:
          maxItems: 6
          type: array
          description: >-
            Textual description of the different modus operandi used during the
            infraction. Only for GET operation.
          readOnly: true
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the modus operandi code. Only for GET
              operation.
            readOnly: true
        otherModusOperandi:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other modus operandi
        modusOperandiDetails:
          maxLength: 255
          pattern: '^$|[\t -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾₠-⃏\‘\’\“\”\–]+'
          type: string
          description: Details on the modus operandi
        thirdCountry:
          type: boolean
          description: The declaration has been transmitted to a third country
      description: Infraction details if exists.
    CashDeclarationCountRequest:
      allOf:
        - $ref: '#/components/schemas/CountRequest'
        - type: object
          properties:
            criteria:
              $ref: '#/components/schemas/CashDeclarationSearchCriteria'
    CashDeclarationCountResponse:
      allOf:
        - $ref: '#/components/schemas/CountResponse'
    LegacyCashDeclarationObject:
      required:
        - customsDeclaration
        - customsOfficeRef
        - declarationDate
        - declarationPlace
        - declarationType
        - endorsedCopyRequested
        - meansOfTransport
        - movementType
        - nationalRef
        - totalCash
      type: object
      properties:
        customsOfficeRef:
          maxLength: 8
          pattern: '^$|^[A-Z]{2}[A-Z0-9]{6}$'
          type: string
          description: >-
            Customs office reference number. The reference number
            (https://ec.europa.eu/taxation_customs/dds2/col/col_home.jsp?Lang=en)
            e.g. BE100100 should be used.
        declarationType:
          type: string
          description: >
            Type of cash declaration i.e. either for accompanied cash (cash
            declaration) or either for unaccompanied cash (cash disclosure).

            * DECLAR: Cash declaration for accompanied cash

            * DISCLO: Cash disclosure for unaccompanied cash
          enum:
            - DECLAR
            - DISCLO
        declarationTypeDescription:
          maxLength: 255
          type: string
          description: >-
            textual description of the type of declaration. Only for GET
            operation.
          readOnly: true
        movementType:
          type: string
          description: >
            Type of cash movement i.e. the movement is entering the EU or
            leaving the EU.

            * ENTERING: Entering community

            * LEAVING: Leaving community
          enum:
            - ENTERING
            - LEAVING
        movementTypeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the code related to movementType in the user
            language. Only for GET operation.
          readOnly: true
        nationalRef:
          maxLength: 100
          type: string
          description: >-
            National reference number provided by the Customs authority. The
            reference must be unique per Member State.
        declarationDate:
          type: string
          description: >-
            Date of the declaration established by the carrier or the declarant
            of the cash.
          format: date
        publicationDate:
          type: string
          description: >-
            Date when the declaration has been published in CIS. Only for GET
            operation.
          format: date
          readOnly: true
        declarationPlace:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Town/country where the declaration has been established.
        businessId:
          maxLength: 25
          type: string
          description: >-
            Business-id of the created declaration in the CIS+ system. The value
            is returned by the CIS+ system and shall not be specified by the
            caller e.g. DEC-BE-20200215-102430125
          readOnly: true
        declarationOwner:
          maxLength: 255
          type: string
          description: >-
            Organisation who created the cash declaration. Only for GET
            operation.
          readOnly: true
        persons:
          type: array
          description: >-
            List of persons involved in the cash declaration or cash disclosure
            i.e. carrier, declarant, sender, owners and recipients. Maximum
            persons allowed are 25.
          items:
            $ref: '#/components/schemas/LegacyPerson'
        companies:
          type: array
          description: >-
            List of legal entities (companies) involved in the cash declaration
            or cash disclosure i.e. owners or recipients of the cash. Maximum
            companies allowed are 25.
          items:
            $ref: '#/components/schemas/LegacyCompany'
        totalCash:
          $ref: '#/components/schemas/LegacyCash'
        meansOfTransport:
          oneOf:
            - $ref: '#/components/schemas/LegacyCourierTransport'
            - $ref: '#/components/schemas/LegacyAirTransport'
            - $ref: '#/components/schemas/LegacySeaTransport'
            - $ref: '#/components/schemas/LegacyRailTransport'
            - $ref: '#/components/schemas/LegacyRoadTransport'
            - $ref: '#/components/schemas/LegacyOtherMeansOfTransport'
        customsDeclaration:
          type: boolean
          description: >-
            Customs declaration for commodities used as highly-liquid store of
            value.
        customsDeclarationNumber:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: >-
            Customs declaration number (for commodities used as high-liquid
            stores of value).
        endorsedCopyRequested:
          type: boolean
          description: Endorsed copy requested by the carrier or declarant.
        infraction:
          $ref: '#/components/schemas/LegacyInfraction'
      description: >-
        (Legacy B2B object) This is the main object representing either a cash
        declaration (accompanied cash) or a cash disclosure  (unaccompanied
        cash)
    LegacyPerson:
      required:
        - address
        - firstName
        - gender
        - identificationDocuments
        - involvements
        - lastName
        - nationality
        - placeOfBirth
      type: object
      properties:
        involvements:
          minItems: 1
          uniqueItems: true
          type: array
          description: >
            Roles of a person in the cash movement i.e. carrier or owner or
            recipient or declarant or sender. Multiple values are possible.

            * CARRIER: Carrier (cash declaration)

            * OWNER: Owner (cash declaration and cash disclosure declaration)

            * RECIP: Recipient (cash declaration and cash disclosure
            declaration)

            * DECLAR: Declarant (cash disclosure declaration)

            * SENDER: Sender (cash disclosure declaration)

            * SENDEREP: Representative of the sender (cash disclosure
            declaration)

            * RECIPREP: Representative of the recipient (cash disclosure
            declaration)
          items:
            type: string
            enum:
              - CARRIER
              - OWNER
              - RECIP
              - DECLAR
              - SENDER
              - SENDEREP
              - RECIPREP
        involvementsDescription:
          uniqueItems: true
          type: array
          items:
            maxLength: 255
            type: string
            description: Textual description of the code related to the involvements
            readOnly: true
        firstName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: First name(s) of the person.
        lastName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Last name(s) of the person.
        nationality:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the nationality of the person.
        gender:
          type: string
          description: |
            Gender
            * MALE: Male
            * FEMALE: Female
            * OTHERGEN: Other 
            * UNKNOW: Unknown
          enum:
            - MALE
            - FEMALE
            - OTHERGEN
            - UNKNOW
        genderDescription:
          maxLength: 255
          type: string
          description: Textual description of the gender code. Only for GET operation.
          readOnly: true
        dateOfBirth:
          type: string
          description: Date of birth. Format YYYY-MM-DD
          format: date
          nullable: true
        placeOfBirth:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Place of birth.
        address:
          $ref: '#/components/schemas/LegacyAddress'
        phone:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9()+ \/\-]+'
          type: string
        email:
          maxLength: 254
          pattern: ^$|.+@.+\..+
          type: string
          description: email of the person (compliant to RFC822)
        identificationDocuments:
          maxItems: 2
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/LegacyIdentificationDocument'
        partOfCash:
          $ref: '#/components/schemas/LegacyCash'
      description: (Legacy B2B object) Person involved in the cash movement
      example:
        involvements:
          - CARRIER
          - OWNER
          - RECIP
        firstName: John
        lastName: Doe
        nationality: BE
        gender: MALE
        dateOfBirth: '1980-06-03'
        placeOfBirth: my place of birth
        address:
          street: 'my street, 123'
          postalCode: B4500
          city: my city
          country: BE
        identificationDocuments:
          - type: IDCARD
            number: 123456789-321
            dateOfIssue: '2015-02-20'
            countryOfIssue: BE
    LegacyAddress:
      required:
        - city
        - country
      type: object
      properties:
        street:
          maxLength: 255
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: street name and house/building number.
        postalCode:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: postal code
        city:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: city name.
        country:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying code of the country.
      description: (Legacy B2B object) physical address of a person or a company
      example:
        street: 'my street, 123'
        postalCode: B4500
        city: my city
        country: BE
    LegacyIdentificationDocument:
      required:
        - number
        - type
      type: object
      properties:
        type:
          type: string
          description: |
            Document identifying a person.  
              * IDCARD: Person ID-Card
              * PASSPORT: Passport
              * PERSID: Personal Identification number
              * OTHER: Other to specify
          enum:
            - IDCARD
            - PASSPORT
            - PERSID
            - OTHER
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the identification type code. Only for GET
            operation.
          readOnly: true
        otherType:
          maxLength: 50
          type: string
          description: >-
            Other type of document used to identify a person. (Used only for
            type = OTHER)
        number:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Identification number.
        dateOfIssue:
          type: string
          description: Date of issue of the identification document in format YYYY-MM-DD.
          format: date
          nullable: true
        countryOfIssue:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the country of issue of the document.
      description: >-
        (Legacy B2B object) Identification  of a person. This includes also the
        personal identification number.
      example:
        type: IDCARD
        number: 123456789-321
        dateOfIssue: '2015-02-20'
        countryOfIssue: BE
    LegacyCash:
      required:
        - cashDetails
      type: object
      properties:
        intendedUses:
          uniqueItems: true
          type: array
          description: Intended uses of the cash.
          items:
            type: string
            description: >
              * LABEXPEN: Labour expenses (salary payments, investment business
              etc)

              * CAPINVES: Capital investment (deposit to bank, insurance payment
              etc)

              * ACQUESTA: Funds for acquiring real estate

              * ACQUPROP: Funds for acquiring moveable property

              * REPAINST: Repayment of loan granted by a legal entity (credit
              institution, bank or company)

              * LOTTGAMB: Lottery and gambling

              * SHIPMAST: Cash to shipmaster/board cash

              * CHARITY:  Charity

              * VACATION: Vacation/Recreation - To be used for cash declaration
              only

              * BANKTRAN: Shipment between financial institutions - To be used
              for Cash disclosure only

              * TRANCASH: Transfer of cash by professional cash couriers
              (currency exchange companies) - To be used for cash declaration
              only

              * TRANOTHE: Transfer of cash by professional cash couriers (other)
              - To be used for Cash declaration only

              * OTHER: Other (specify)
            enum:
              - REPAPERS
              - REPAINST
              - CAPINVES
              - ACQUPROP
              - ACQUESTA
              - LOTTGAMB
              - LABEXPEN
              - SHIPMAST
              - CHARITY
              - VACATION
              - BANKTRAN
              - TRANCASH
              - TRANOTHE
              - OTHER
        intendedUsesDescription:
          uniqueItems: true
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the codes related to intendedUses. Only for
              GET operation.
            readOnly: true
        otherIntendedUse:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other intended use of the cash (use only for intendedUse = OTHER)
        provenances:
          uniqueItems: true
          type: array
          description: Economic provenances of the cash. At least one value is mandatory.
          items:
            type: string
            description: >
              * LABOPROF: Labour profits (income, retirement, income from
              entrepreneurship etc)

              * INVESTPR: Capital profits (dividends, investment profits,
              interest, insurance payments etc)

              * SALEESTA: Sale of real estate

              * SALEPROP: Sale of movable property

              * LOANPERS: Loan granted by another natural person

              * LOANINST: Loan granted by legal entity (credit institution, bank
              or company)

              * LOTTERY:  Lottery/gambling

              * GIFTDONA: Gift/donation

              * BANKTRAN: Shipment between financial institutions - To be used
              for Cash disclosure only

              * INHERTAN: Inheritance

              * OTHER: Other to specify
            enum:
              - LOANPERS
              - LOANINST
              - INVESTPR
              - SALEPROP
              - SALEESTA
              - LOTTERY
              - LABOPROF
              - GIFTDONA
              - BANKTRAN
              - INHERTAN
              - OTHER
        provenancesDescription:
          uniqueItems: true
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the code related to provenances. Only for
              GET operation.
            readOnly: true
        otherProvenance:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: >-
            Other economic provenance of the cash (use only for provenance =
            OTHER)
        cashDetails:
          minItems: 1
          type: array
          description: >-
            Type of cash and associated amounts & currency. Maximum cashDetails
            allowed are 60.
          items:
            $ref: '#/components/schemas/LegacyCashDetail'
      description: >-
        (Legacy B2B object) Details of the cash i.e. intended uses, provenances
        and type of cash. The cash can be either the total declared cash
        (carried by the carried or declared by the declarant) or a part of it
        specific to an owner/recipient when there are more than one
        owner/recipient in the declaration.
      example:
        intendedUses:
          - REPAPERS
          - REPAINST
        provenances:
          - OTHER
        cashDetails:
          - cashType: BAR
            amount: 20000
            currency: USD
            amountEuro: 18125.45
            quantity: 1
            weight: 500
          - cashType: BANKNOTE
            amount: 10000
            currency: EUR
            amountEuro: 10000
    LegacyCashDetail:
      required:
        - amount
        - amountEuro
        - cashType
        - currency
      type: object
      properties:
        cashType:
          type: string
          description: >
            Type of cash as mentioned in regulation EU 2018/1672.

            * BANKNOTE: Currency - Bank notes

            * COIN: Currency - Coins

            * TRAVCHEQUE: Bearer-negotiable Instruments - Traveller's cheques

            * CHEQUE: Bearer-negotiable Instruments - Cheques

            * PROMNOTES: Bearer-negotiable Instruments - Promissory notes

            * MONEYORDER: Bearer-negotiable Instruments - Money orders

            * GCOIN: Commodities used as highly-liquid stores of value - Gold
            coins

            * BAR: Commodities used as highly-liquid stores of value - Gold bars

            * NUGGET: Commodities used as highly-liquid stores of value - Gold
            nuggets

            * CLUMP: Commodities used as highly-liquid stores of value - Gold
            clumps

            * OTHER: Other type of cash (prepaid cards...)
          enum:
            - BANKNOTE
            - COIN
            - TRAVCHEQUE
            - CHEQUE
            - PROMNOTES
            - MONEYORDER
            - GCOIN
            - BAR
            - NUGGET
            - CLUMP
            - OTHER
        cashTypeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the code related to cash type. Only for GET
            operation.
          readOnly: true
        otherCashType:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: >-
            Other type of cash e.g. prepaid card. (use only for cashType =
            OTHER)
        amount:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: Amount of cash (with 2 decimals).
        currency:
          maxLength: 3
          pattern: '^$|^[A-Z]{3}$'
          type: string
          description: ISO 4217 code for the currency used.
        amountEuro:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: Amount converted in Euro (with 2 decimals).
        quantity:
          type: integer
          description: Number of items. Only for commodities.
        weight:
          minimum: 0
          pattern: '^[0-9]+(\\.[0-9]{1,2})?$'
          type: number
          description: >-
            Total weight in grams (with 2 decimals) (for cash type
            COMMODITY|GCOIN, COMMODITY|BAR, COMMODITY|NUGGET, COMMODITY|CLUMP).
            Only for commodities.
      description: >-
        (Legacy B2B object) Detailed description of the cash type and cash
        content (amount and currency)
      example:
        cashType: BANKNOTE
        amount: 20000
        currency: USD
        amountEuro: 18125.45
    LegacyCompany:
      required:
        - address
        - involvements
        - name
        - registrationCountry
        - registrationName
        - registrationNumber
      type: object
      properties:
        involvements:
          minItems: 1
          uniqueItems: true
          type: array
          description: >
            Roles of a company in the cash movement. 

            * OWNER: Owner of the cash (cash declaration and cash disclosure
            declaration)

            * SENDER: Sender of the cash (cash disclosure declaration)

            * RECIP: Recipient of the cash (cash declaration and cash disclosure
            declaration)
          items:
            type: string
            enum:
              - OWNER
              - SENDER
              - RECIP
        involvementsDescription:
          uniqueItems: true
          type: array
          items:
            maxLength: 255
            type: string
            description: >-
              Textual description of the involvement codes. Only for GET
              operation.
            readOnly: true
        name:
          maxLength: 255
          type: string
          description: Name of the company.
        address:
          $ref: '#/components/schemas/LegacyAddress'
        registrationNumber:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Company registration number
        registrationName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Name of register
        registrationCountry:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the registration country of the company.
        vatNumber:
          maxLength: 15
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Company VAT number
        eoriNumber:
          maxLength: 17
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Company EORI number (2 letters and max 15 digits)
        phone:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9()+ \/\-]+'
          type: string
          description: Fixed phone number of the company.
        email:
          maxLength: 254
          pattern: ^$|.+@.+\..+
          type: string
          description: Email of the company (compliant to RFC822)
        partOfCash:
          $ref: '#/components/schemas/LegacyCash'
      description: (Legacy B2B object) Company involved in the cash movement
      example:
        involvements:
          - OWNER
          - SENDER
        name: my company
        address:
          street: 'my street, 123'
          postalCode: B4500
          city: my city
          country: BE
        registrationNumber: REG1234
        registrationName: Chamber of commerce Brussels
        registrationCountry: BE
    LegacyCourierTransport:
      required:
        - courier
        - routings
      type: object
      properties:
        courier:
          $ref: '#/components/schemas/LegacyCourier'
        routings:
          maxItems: 2
          minItems: 2
          type: array
          description: >-
            Itinerary of the cash movement. This includes the departure and
            arrival.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: >-
        (Legacy B2B object) Transport by courier/post. Used only for cash
        disclosure declaration.
    LegacyCourier:
      required:
        - type
      type: object
      properties:
        type:
          type: string
          description: >
            Transport by Post (postal package) or by express courier (courier
            shipment).

            * EXPCOU: Express courier shipment

            * POST: Postal package
          enum:
            - EXPCOU
            - POST
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the couriertype's code. Only for GET
            operation.
          readOnly: true
      description: (Legacy B2B object) Details for courier/post transportation.
      example:
        type: POST
    LegacyRouting:
      required:
        - country
        - step
      type: object
      properties:
        step:
          type: string
          description: >
            Routing step related to the transport movement from departure to
            destination including transit (if available). If there are several
            transits, several routing steps need to be specified. Only one
            routing step DEPART and one routing step DESTIN are allowed. The
            routing step TRANSI and LANDBO must be used only for cash
            declaration. The routing steps must be specified in chronological
            order.

            * DEPART: Departure

            * TRANSI: Transit (Only for cash declaration)

            * LANDBO: Land border crossing (Used for road transport in cash
            declaration only)

            * ARRIVA: Arrival/final destination
          enum:
            - DEPART
            - TRANSI
            - LANDBO
            - ARRIVA
        stepDescription:
          maxLength: 255
          type: string
          description: Textual description of the step code. Only for GET operation.
          readOnly: true
        country:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the country of the movement.
        place:
          maxLength: 7
          type: string
          description: >-
            UN Location code of the airport/port/station/land border crossing
            point. If not known, use the value 'UNKNOWN'. For a free text, use
            the value 'OTHER'. Used for cash declaration only.
        placeDescription:
          maxLength: 255
          type: string
          description: >-
            Name of the location without diacritics signs as specified in the
            UN/LOCODE standard. Only for GET operation.
        otherPlace:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Free text for other place when place = OTHER
        routingDate:
          type: string
          description: >-
            Date of the movement (YYYY-MM-DD) for departure,
            arrival/destination, land border crossing or transit. Used for cash
            declaration only.
          format: date
          nullable: true
      description: (Legacy B2B object) Routing
      example:
        step: DEPART
        country: BE
        place: BEBRU
        routingDate: '2020-02-16'
    LegacyAirTransport:
      required:
        - air
        - routings
      type: object
      properties:
        air:
          $ref: '#/components/schemas/LegacyAir'
        routings:
          minItems: 2
          type: array
          description: >-
            Itinerary of the cash movement. This includes the departure, arrival
            and optionally transits. Maximum routings allowed are 20.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: (Legacy B2B object) Transport by air.
    LegacyAir:
      type: object
      properties:
        type:
          type: string
          description: |
            Transport by passenger aircraft, business jet or other.
            * PASAIR: Commercial flight
            * BUSJET: Private jet
            * OTHER: Other
          enum:
            - PASAIR
            - BUSJET
            - OTHER
        typeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the air passenger type's code. Only for GET
            operation.
          readOnly: true
        flightNumber:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Commercial flight number.
        registrationNumber:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: registration number of the private jet.
      description: >-
        (Legacy B2B object) Details for air transport (Used for cash declaration
        only. Must remain empty for cash disclosure). One of flightNumber or
        registrationNumber must be specified.
      example:
        type: PASAIR
        flightNumber: LH123456
    LegacySeaTransport:
      required:
        - routings
        - vessel
      type: object
      properties:
        vessel:
          $ref: '#/components/schemas/LegacyVessel'
        routings:
          minItems: 2
          type: array
          description: >-
            Itinerary of the  cash. This includes the departure, arrival and
            optionally transits.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: (Legacy B2B object) Transport by sea/river
    LegacyVessel:
      type: object
      properties:
        vesselName:
          maxLength: 100
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Name of vessel name + name of the shipping line.
        vesselType:
          type: string
          description: |
            Transport by vessel i.e. commercial, yacht, cruise, other.
            * COM: commercial vessel
            * YACHT: Yacht
            * CRUISE: Cruise vessel
            * OTHER: Other
          enum:
            - COM
            - YACHT
            - CRUISE
            - OTHER
        vesselTypeDescription:
          maxLength: 255
          type: string
          description: Textual description of the vessel code. Only for GET operation.
          readOnly: true
      description: >-
        (Legacy B2B object) Details for transport by sea/river (Used for cash
        declaration only. Must remain empty for cash disclosure).
      example:
        name: my vessel name and shipping line
        vesselType: CRUISE
    LegacyRailTransport:
      required:
        - rail
        - routings
      type: object
      properties:
        rail:
          $ref: '#/components/schemas/LegacyRail'
        routings:
          minItems: 2
          type: array
          description: >-
            Itinerary of the cash. This includes the departure, arrival and
            optionally transits.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: (Legacy B2B object) Transport by rail.
    LegacyRail:
      type: object
      properties:
        company:
          maxLength: 50
          type: string
          description: Train company.
        number:
          maxLength: 50
          pattern: '^$|[a-zA-Z0-9]+'
          type: string
          description: Train number.
      description: >-
        (Legacy B2B object) Details for rail transport (Used for cash
        declaration only. Must remain empty for cash disclosure)
      example:
        company: my train company
        number: '1213456'
    LegacyRoadTransport:
      required:
        - road
        - routings
      type: object
      properties:
        road:
          $ref: '#/components/schemas/LegacyRoad'
        routings:
          minItems: 2
          type: array
          description: >-
            Itinerary of the cash. This includes the departure, arrival, land
            border crossing point and optionally transits.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: (Legacy B2B object) Transport by road.
    LegacyRoad:
      type: object
      properties:
        nationality:
          maxLength: 2
          pattern: '^$|^[A-Z]{2}$'
          type: string
          description: >-
            ISO 3166-1 alpha-2 code except for Great Britain where UK must be
            used signifying the vehicle registration country.
        licensePlate:
          maxLength: 50
          pattern: '^$|[À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾a-zA-Z0-9 \-''\._]+'
          type: string
          description: Registrered licence plate of the vehicle.
        vehicleType:
          type: string
          description: |
            Type of transport by road i.e. truck, car, bus, other.
            * LORRY: truck
            * PRICAR: car
            * BUS: bus
            * OTHER: Other
          enum:
            - LORRY
            - PRICAR
            - BUS
            - OTHER
        vehicleTypeDescription:
          maxLength: 255
          type: string
          description: Textual description of the vehicle's code. Only for GET operation.
          readOnly: true
      description: >-
        (Legacy B2B object) Details for road transport (only for cash
        declaration only. Must remain empty for cash disclosure)
      example:
        nationality: BE
        licensePlate: ABC123
        vehicleType: LORRY
    LegacyOtherMeansOfTransport:
      required:
        - other
        - routings
      type: object
      properties:
        other:
          $ref: '#/components/schemas/LegacyOtherTransport'
        routings:
          minItems: 2
          type: array
          description: >-
            Itinerary of the person carrying the cash. This includes the
            departure, arrival and possibly any transit.
          items:
            $ref: '#/components/schemas/LegacyRouting'
      description: (Legacy B2B object) Other means of transport.
    LegacyOtherTransport:
      required:
        - type
      type: object
      properties:
        type:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
      description: >-
        (Legacy B2B object) Details of other means of transport e.g. bicycle,
        pedestrian
    LegacyInfraction:
      required:
        - belowThreshold
        - cashNotAvailable
        - concealmentType
        - controlDate
        - criminalActivity
        - detention
        - euFinancialEffect
        - incorrectDeclaration
        - modusOperandi
        - nonDeclaration
        - penaltyStarted
        - remedy
        - thirdCountry
      type: object
      properties:
        controlDate:
          type: string
          description: date of the control.
          format: date
        incorrectDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with articles 5(3) Reg.
            2018/1672. Incorrect/incomplete declaration
        nonDeclaration:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Non declaration
        cashNotAvailable:
          type: boolean
          description: >-
            Ex officio declaration in accordance with article 5(3) Reg
            2018/1672. Cash not available for control
        belowThreshold:
          type: boolean
          description: >-
            Information obtained in accordance with articles 6(1) or 6(2) Reg
            2018/1672 for cash below threshold of 10000 EUR where there are
            indication that cash is related to criminal activity.
        criminalActivity:
          type: boolean
          description: Indications that cash is related to criminal activity
        euFinancialEffect:
          type: boolean
          description: >-
            Indications that cash is related to criminal activity which could
            adversely affect the financial interests of the union.
        detention:
          type: boolean
        remedy:
          type: boolean
        penaltyStarted:
          type: boolean
          description: Penalty proceeding started
        concealmentType:
          type: string
          description: |
            Concealment type used during the infraction.
            * PERSBODY: On the persons - on the body
            * PERSCLOT: On the persons - in clothing
            * PERSSHOE: On the persons - in shoes
            * PERSSTUF: On the persons - stuffed
            * PERSSWAL: On the persons - swallowed
            * HANDLUGG: In hand luggage
            * CHECLUGG: In checked luggage
            * MEANSTR: In means of transport
            * CONSIGNE: In consignments
            * RECEPTAC: In receptacles
            * NOTCONCE: Not concealed
            * OTHER: Other (specify)
          enum:
            - PERSBODY
            - PERSCLOT
            - PERSSHOE
            - PERSSTUF
            - PERSSWAL
            - HANDLUGG
            - CHECLUGG
            - MEANSTR
            - CONSIGNE
            - RECEPTAC
            - NOTCONCE
            - OTHER
        concealmentTypeDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the concealment type code. Only for GET
            operation.
          readOnly: true
        otherConcealmentType:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other type of concealment
        concealmentDetails:
          maxLength: 255
          pattern: '^$|[\t -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾₠-⃏\‘\’\“\”\–]+'
          type: string
          description: Details of the concealment
        modusOperandi:
          type: string
          description: |
            Modus operandi used for the infraction.
            * FALSVO: False declaration of value (over evaluation)
            * FALSVU: False declaration of value (under evaluation)
            * FALSEI: Presentation of false/irregular documents
            * TERROFIN: Suspicion of terrorism financing
            * MONEYL: Money laundering
            * OTHER: Other (specify)
          enum:
            - FALSVO
            - FALSVU
            - FALSEI
            - TERROFIN
            - MONEYL
            - OTHER
        modusOperandiDescription:
          maxLength: 255
          type: string
          description: >-
            Textual description of the modus operandi code. Only for GET
            operation.
          readOnly: true
        otherModusOperandi:
          maxLength: 100
          pattern: '^$|[ -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾\‘\’\“\”\–]+'
          type: string
          description: Other modus operandi
        modusOperandiDetails:
          maxLength: 255
          pattern: '^$|[\t -~À-ɏͰ-ϿЀ-ԯᲀ-ᲈḀ-ỿἀ-῾₠-⃏\‘\’\“\”\–]+'
          type: string
          description: Details on the modus operandi
        thirdCountry:
          type: boolean
          description: The declaration has been transmitted to a third country
      description: (Legacy B2B object) Infraction details if exists.
    Error:
      type: object
      properties:
        code:
          maxLength: 100
          type: string
          description: |
            Global error code
            * CSH-BKE-0x00000000: System error. Please contact AFIS Helpdesk
            * CSH-BKE-0x00001000: Access denied
            * CSH-BKE-0x00001001: Authentication failed
            * CSH-BKE-0x00002000: Business validation error
        uuid:
          maxLength: 36
          type: string
          description: code used for system error
        details:
          type: array
          items:
            $ref: '#/components/schemas/ErrorMessage'
      description: (Legacy B2B object) error
    ErrorMessage:
      type: object
      properties:
        code:
          maxLength: 100
          type: string
          description: >
            List of return codes

            * CSH-BKE-0x00002100: Mandatory field

            * CSH-BKE-0x00002101: Steps departure and arrival mandatory

            * CSH-BKE-0x00002102: Declarant, owner, sender and recipient
            involvements are mandatory

            * CSH-BKE-0x00002103: Carrier, owner and recipient involvements are
            mandatory

            * CSH-BKE-0x00002104: Fields mandatory for commodities used as
            highly-liquid stores of value

            * CSH-BKE-0x00002105: Type and flight or registration number for air
            transport are mandatory

            * CSH-BKE-0x00002106: Fields Company and number for rail transport
            are mandatory

            * CSH-BKE-0x00002107: Fields Vehicle type, license plate and
            nationality for road transport are mandatory

            * CSH-BKE-0x00002108: Fields Vessel type and vessel name for sea
            transport are mandatory

            * CSH-BKE-0x00002109: Missing carrier birthdate

            * CSH-BKE-0x00002110: Missing declarant birthdate

            * CSH-BKE-0x00002111: At least one person or one company must be
            specified in the ex-officio declaration

            * CSH-BKE-0x00002112: 'Part of cash' information is missing for at
            least one owner or one recipient

            * CSH-BKE-0x00002113: There is no provenance for at least one owner
            in "total cash" or "partial cash" section

            * CSH-BKE-0x00002114: There is no intended use for at least one
            recipient in "partial cash" or "total cash" section

            * CSH-BKE-0x00002200: Invalid value

            * CSH-BKE-0x00002201: Maximum size exceeded

            * CSH-BKE-0x00002202: Invalid sender/recipient representative
            involvement. Must be associated to the declarant

            * CSH-BKE-0x00002203: Invalid date (inconsistent or in the future)

            * CSH-BKE-0x00002204: Only one type of means of transport is
            allowed 

            * CSH-BKE-0x00002205: Step arrival occurs before departure

            * CSH-BKE-0x00002206: Total cash amounts and currencies do not match
            the sum of partial cash amounts and currencies

            * CSH-BKE-0x00002207: Invalid Customs office reference: it does not
            start with your country code

            * CSH-BKE-0x00002208: Part of cash allowed only for owner or
            recipient

            * CSH-BKE-0x00002300: Field value not allowed for this declaration
            type

            * CSH-BKE-0x00002301: Transit routing step valid only for cash
            declaration

            * CSH-BKE-0x00002302: Only one departure/arrival step is allowed

            * CSH-BKE-0x00002303: Only one carrier/declarant/sender is allowed

            * CSH-BKE-0x00002304: Details for Means of Transport must remain
            empty for cash disclosure

            * CSH-BKE-0x00002305: At least one value in the collection is not
            allowed for this declaration type

            * CSH-BKE-0x00002306: The type of infraction is missing (non
            declaration, incorrect declaration, cash not available for control,
            cash below threshold, cash related to criminal activity, cash
            related to criminal activity affecting EU budget)

            * CSH-BKE-0x00002400: Value already exists / duplicate value
        field:
          maxLength: 100
          type: string
          description: identification of the invalid field
      description: (Legacy B2B object) detail description of the error
    SearchRequest:
      title: Search request
      required:
        - criteria
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/Pagination'
        criteria:
          $ref: '#/components/schemas/Criteria'
        sort:
          type: array
          items:
            $ref: '#/components/schemas/Sort'
      description: >-
        This object contains the generic attributes of the search request. Some
        elements (sorting, criteria) should be extended to add resource specific
        attributes.
    Pagination:
      title: Pagination
      required:
        - pageNumber
        - pageSize
      type: object
      properties:
        pageNumber:
          minimum: 1
          type: integer
          description: The requested page of the result set.
          default: 1
        pageSize:
          maximum: 100
          minimum: 1
          type: integer
          description: The number of results that should be returned per page.
          default: 20
      description: >-
        This object contains the pagination attributes for search operations. If
        nothing is specified the default pagination values will apply.
    Criteria:
      title: Abstract criteria
      type: object
      description: >-
        This object contains the resource specific criteria for search and
        count.
    Sort:
      title: Sort
      required:
        - direction
        - orderBy
      type: object
      properties:
        direction:
          type: string
          default: desc
          enum:
            - asc
            - desc
        orderBy:
          maxLength: 100
          type: string
      description: >-
        This object describes the generic attributes of a search sort. Projects
        should extend it and define their own orderBy enum attribute that lists
        the resource specific attributes that can be sorted upon.
      example:
        direction: desc
        orderBy: amount
    SearchResponse:
      title: Search response
      required:
        - currentPage
        - hasMoreElements
        - records
      type: object
      properties:
        currentPage:
          type: integer
          description: 'The current page of the search result, starting from 1.'
        hasMoreElements:
          type: boolean
          description: 'if true, a next page is available in the result set.'
          default: false
        records:
          type: array
          description: The list of returned items
          items: {}
      description: >-
        This object contains the generic attributes of the search response.
        Projects should extend it and override the records attribute to provide
        an array of resource specific search results.
    CountRequest:
      title: Count request
      required:
        - criteria
      type: object
      properties:
        criteria:
          $ref: '#/components/schemas/Criteria'
      description: Standard request object for requesting a count of search results.
    CountResponse:
      title: Count response
      required:
        - totalCount
      type: object
      properties:
        totalCount:
          type: integer
          description: The total number of results for a search query.
          format: int64
      description: >-
        Standard response when requesting the total count of results for a
        search query.
  examples:
    CashDeclarationSearchRequest:
      value:
        pagination:
          pageNumber: 1
          pageSize: 20
        sort:
          - orderBy: totalAmountEuro
            direction: asc
          - orderBy: nationalRef
            direction: desc
          - orderBy: movementType
            direction: desc
          - orderBy: declarationType
            direction: desc
          - orderBy: publicationDate
            direction: desc
          - orderBy: departureCountry
            direction: desc
          - orderBy: destinationCountry
            direction: desc
          - orderBy: meansOfTransport
            direction: desc
          - orderBy: businessId
            direction: desc
        criteria:
          nationalRef: Ref
          declarationType: DECLAR
          movementType: ENTERING
          businessId: DEC-BE-00
          declarationCountry: BE
          declarationDateFrom: '2021-11-01'
          publicationDateTo: '2021-11-15'
          lastUpdateDateFrom: '2021-11-01'
          lastUpdateDateTo: '2021-11-15'
          cashType: BANKNOTE
          meansOfTransport:
            - SEA
            - OTHER
          totalAmountEuroFrom: 100.01
          totalAmountEuroTo: 10000
          intendedUses:
            - REPAPERS
            - CAPINVES
            - OTHER
          provenances:
            - LOANPERS
            - LOANINST
            - OTHER
          companyCriteria:
            name: the recipient company
            city: another city name
            country: BE
            registrationNumber: '123456'
          personCriteria:
            firstName: John
            lastName: Doe
            nationality: BE
            city: the city name
            country: BE
            identificationNumber: '1234'
          routingCriteria:
            step: DEPART
            country:
              - BE
              - FR
          infractionCriteria:
            infraction: true
            incorrectDeclaration: true
            nonDeclaration: true
            cashNotAvailable: false
            criminalActivity: false
            detention: true
            penaltyStarted: true
            modusOperandi:
              - FALSVU
              - FALSEI
              - OTHER
            concealmentType:
              - PERSBODY
              - PERSSTUF
    CashDeclarationSearchResponse:
      value:
        currentPage: 0
        hasMoreElements: true
        records:
          - nationalRef: Ref11111/11
            movementType: ENTERING
            declarationType: DECLAR
            publicationDate: '2021-11-04'
            departureCountry: BE
            destinationCountry: CN
            meansOfTransport: SEA
            totalAmountEuro: 100
            businessId: DEC-BE-0001010201200101
          - nationalRef: Ref11111/12
            movementType: ENTERING
            declarationType: DECLAR
            publicationDate: '2021-11-04'
            departureCountry: BE
            destinationCountry: DE
            meansOfTransport: SEA
            totalAmountEuro: 19999.1
            businessId: DEC-BE-0001010201200102
    CashDeclarationGetResponse:
      value:
        customsOfficeRef: BE989898
        declarationType: DECLAR
        declarationTypeDescription: Cash declaration
        movementType: ENTERING
        movementTypeDescription: Entering EU
        nationalRef: BE_1644354713
        declarationDate: '2021-03-01'
        publicationDate: '2022-02-14'
        declarationPlace: Brussels
        businessId: DEC-BE-20220214-120649482
        declarationOwner: BE_CUSTOMS
        persons:
          - involvements:
              - CARRIER
            involvementsDescription:
              - Carrier
            firstName: John
            lastName: Doe
            nationality: UK
            nationalityDescription: UNITED KINGDOM
            gender: MALE
            genderDescription: Male
            dateOfBirth: '1981-03-01'
            placeOfBirth: London
            address:
              city: London
              country: UK
              countryDescription: UNITED KINGDOM
            identificationDocuments:
              - type: PASSPORT
                typeDescription: Passport
                number: EN23092323
          - involvements:
              - OWNER
            involvementsDescription:
              - Owner
            firstName: Lilly
            lastName: Sven
            nationality: US
            nationalityDescription: UNITED STATES
            gender: FEMALE
            genderDescription: Female
            placeOfBirth: New York
            address:
              city: New York
              country: US
              countryDescription: UNITED STATES
            identificationDocuments:
              - type: IDCARD
                typeDescription: Person ID-Card
                number: US023232323
            partOfCash:
              intendedUses:
                - ACQUPROP
              intendedUsesDescription:
                - Funds for acquiring moveable property
              provenances:
                - LOANPERS
              provenancesDescription:
                - Loan granted by another natural person
              cashDetails:
                - cashType: BANKNOTE
                  cashTypeDescription: Currency - Bank notes
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                - cashType: COIN
                  cashTypeDescription: Currency - Coins
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                - cashType: TRAVCHEQUE
                  cashTypeDescription: Bearer negotiable instruments - Traveller's cheques
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                - cashType: PROMNOTES
                  cashTypeDescription: Bearer negotiable instruments Promissory notes
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
          - involvements:
              - RECIP
            involvementsDescription:
              - Recipient
            firstName: Grace
            lastName: Kelly
            nationality: DE
            nationalityDescription: GERMANY
            gender: UNKNOW
            genderDescription: Unknown
            placeOfBirth: Berlin
            address:
              city: Berlin
              country: DE
              countryDescription: GERMANY
            identificationDocuments:
              - type: PASSPORT
                typeDescription: Passport
                number: DE023234232
            partOfCash:
              intendedUses:
                - ACQUESTA
                - CAPINVES
                - LOTTGAMB
              intendedUsesDescription:
                - Funds for acquiring real estate
                - >-
                  Capital investment (deposit to bank account, insurance payment
                  etc.)
                - Lottery and gambling
              provenances:
                - SALEPROP
                - LOANPERS
                - LOANINST
                - INVESTPR
              provenancesDescription:
                - Sale of moveable property
                - Loan granted by another natural person
                - >-
                  Loan granted by legal entity (credit institution, bank or
                  company)
                - >-
                  Capital profits (dividends, investment profits, interest,
                  insurance payments etc.)
              cashDetails:
                - cashType: TRAVCHEQUE
                  cashTypeDescription: Bearer negotiable instruments - Traveller's cheques
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                - cashType: BANKNOTE
                  cashTypeDescription: Currency - Bank notes
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                - cashType: COIN
                  cashTypeDescription: Currency - Coins
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
          - involvements:
              - RECIP
            involvementsDescription:
              - Recipient
            firstName: Adam
            lastName: Merks
            nationality: DE
            nationalityDescription: GERMANY
            gender: MALE
            genderDescription: Male
            placeOfBirth: Frankfurt
            address:
              city: Frankfurt
              country: DE
              countryDescription: GERMANY
            identificationDocuments:
              - type: PERSID
                typeDescription: Personal Identification number
                number: DE03043453453
            partOfCash:
              intendedUses:
                - ACQUPROP
                - ACQUESTA
                - CAPINVES
                - LOTTGAMB
              intendedUsesDescription:
                - Funds for acquiring moveable property
                - Funds for acquiring real estate
                - >-
                  Capital investment (deposit to bank account, insurance payment
                  etc.)
                - Lottery and gambling
              provenances:
                - SALEESTA
                - SALEPROP
                - LOTTERY
              provenancesDescription:
                - Sale of real estate
                - Sale of moveable property
                - Lottery and gambling winnings
              cashDetails:
                - cashType: PROMNOTES
                  cashTypeDescription: Bearer negotiable instruments Promissory notes
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
        companies:
          - involvements:
              - OWNER
            involvementsDescription:
              - Owner
            name: Dealings
            address:
              city: Brussels
              country: BE
              countryDescription: BELGIUM
            registrationNumber: BE34434343434
            registrationName: Banque Carrefour National
            registrationCountry: BE
            registrationCountryDescription: BELGIUM
            partOfCash:
              intendedUses:
                - ACQUPROP
                - REPAPERS
                - CAPINVES
              intendedUsesDescription:
                - Funds for acquiring moveable property
                - Repayment of loan granted by a natural person
                - >-
                  Capital investment (deposit to bank account, insurance payment
                  etc.)
              provenances:
                - SALEESTA
                - LABOPROF
              provenancesDescription:
                - Sale of real estate
                - >-
                  Labour profits (Wage income, retirement, income from
                  entrepreneurship etc.)
              cashDetails:
                - cashType: GCOIN
                  cashTypeDescription: >-
                    Commodities used as highly-liquid stores of value - Gold
                    coins
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                  quantity: 10000000
                  weight: 9636800
                - cashType: TRAVCHEQUE
                  cashTypeDescription: Bearer negotiable instruments - Traveller's cheques
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
          - involvements:
              - RECIP
            involvementsDescription:
              - Recipient
            name: Travels Ltd
            address:
              city: New Delhi
              country: IN
              countryDescription: INDIA
            registrationNumber: IN232342342
            registrationName: Company Register India
            registrationCountry: IN
            registrationCountryDescription: INDIA
            partOfCash:
              intendedUses: []
              intendedUsesDescription: []
              provenances: []
              provenancesDescription: []
              cashDetails:
                - cashType: GCOIN
                  cashTypeDescription: >-
                    Commodities used as highly-liquid stores of value - Gold
                    coins
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
                  quantity: 10000000
                  weight: 9636800
                - cashType: TRAVCHEQUE
                  cashTypeDescription: Bearer negotiable instruments - Traveller's cheques
                  amount: 9636800
                  currency: EUR
                  currencyDescription: EURO
                  amountEuro: 9636800
        totalCash:
          intendedUses:
            - ACQUPROP
            - REPAPERS
            - REPAINST
            - ACQUESTA
            - CAPINVES
            - LOTTGAMB
          intendedUsesDescription:
            - Funds for acquiring moveable property
            - Repayment of loan granted by a natural person
            - >-
              Repayment of loan granted by a legal entity (credit institution,
              bank or company)
            - Funds for acquiring real estate
            - >-
              Capital investment (deposit to bank account, insurance payment
              etc.)
            - Lottery and gambling
          provenances:
            - SALEESTA
            - SALEPROP
            - LOANPERS
            - LOANINST
            - INVESTPR
          provenancesDescription:
            - Sale of real estate
            - Sale of moveable property
            - Loan granted by another natural person
            - 'Loan granted by legal entity (credit institution, bank or company)'
            - >-
              Capital profits (dividends, investment profits, interest,
              insurance payments etc.)
          cashDetails:
            - cashType: BANKNOTE
              cashTypeDescription: Currency - Bank notes
              amount: 9636800
              currency: EUR
              currencyDescription: EURO
              amountEuro: 9636800
            - cashType: COIN
              cashTypeDescription: Currency - Coins
              amount: 9636800
              currency: EUR
              currencyDescription: EURO
              amountEuro: 9636800
            - cashType: TRAVCHEQUE
              cashTypeDescription: Bearer negotiable instruments - Traveller's cheques
              amount: 19273600
              currency: EUR
              currencyDescription: EURO
              amountEuro: 19273600
            - cashType: PROMNOTES
              cashTypeDescription: Bearer negotiable instruments Promissory notes
              amount: 9636800
              currency: EUR
              currencyDescription: EURO
              amountEuro: 9636800
            - cashType: GCOIN
              cashTypeDescription: Commodities used as highly-liquid stores of value - Gold coins
              amount: 9636800
              currency: EUR
              currencyDescription: EURO
              amountEuro: 9636800
              quantity: 10000000
              weight: 9636800
        meansOfTransport:
          typeOfTransport: ROAD
          routings:
            - step: DEPART
              stepDescription: Departure
              country: BE
              countryDescription: BELGIUM
              place: BEANT
              placeDescription: Antwerp Churchill Terminal
              routingDate: '2021-03-01'
            - step: ARRIVA
              stepDescription: Arrival
              country: BE
              countryDescription: BELGIUM
              place: BEANT
              placeDescription: Antwerp Churchill Terminal
              routingDate: '2021-03-14'
          nationality: AD
          nationalityDescription: ANDORRA
          licensePlate: AND2023232
          vehicleType: PRICAR
          vehicleTypeDescription: Car
        customsDeclaration: false
        endorsedCopyRequested: false
        infraction:
          controlDate: '2021-03-01'
          incorrectDeclaration: true
          nonDeclaration: true
          cashNotAvailable: true
          belowThreshold: true
          criminalActivity: true
          euFinancialEffect: true
          detention: false
          remedy: false
          penaltyStarted: false
          concealmentType:
            - PERSSHOE
          concealmentTypeDescription:
            - On person - in shoes
          concealmentDetails: In the shoes
          modusOperandi:
            - FALSVU
          modusOperandiDescription:
            - False declaration of value (under evaluation)
          modusOperandiDetails: Regular
          thirdCountry: false
        lastUpdateDate: '2024-01-19'
    CashDeclarationNew:
      value:
        customsOfficeRef: BE989898
        declarationType: DECLAR
        movementType: ENTERING
        nationalRef: BE_1644354713
        declarationDate: '2021-03-01'
        publicationDate: '2022-02-14'
        declarationPlace: Brussels
        persons:
          - involvements:
              - CARRIER
            firstName: John
            lastName: Doe
            nationality: UK
            gender: MALE
            dateOfBirth: '1981-03-01'
            placeOfBirth: London
            address:
              city: London
              country: UK
            identificationDocuments:
              - type: PASSPORT
                number: EN23092323
          - involvements:
              - OWNER
            firstName: Lilly
            lastName: Sven
            nationality: US
            gender: FEMALE
            placeOfBirth: New York
            address:
              city: New York
              country: US
            identificationDocuments:
              - type: IDCARD
                number: US023232323
            partOfCash:
              intendedUses:
                - ACQUPROP
              provenances:
                - LOANPERS
              cashDetails:
                - cashType: BANKNOTE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                - cashType: COIN
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                - cashType: TRAVCHEQUE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                - cashType: PROMNOTES
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
          - involvements:
              - RECIP
            firstName: Grace
            lastName: Kelly
            nationality: DE
            gender: UNKNOW
            placeOfBirth: Berlin
            address:
              city: Berlin
              country: DE
            identificationDocuments:
              - type: PASSPORT
                number: DE023234232
            partOfCash:
              intendedUses:
                - ACQUESTA
                - CAPINVES
                - LOTTGAMB
              provenances:
                - SALEPROP
                - LOANPERS
                - LOANINST
                - INVESTPR
              cashDetails:
                - cashType: TRAVCHEQUE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                - cashType: BANKNOTE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                - cashType: COIN
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
          - involvements:
              - RECIP
            firstName: Adam
            lastName: Merks
            nationality: DE
            gender: MALE
            placeOfBirth: Frankfurt
            address:
              city: Frankfurt
              country: DE
            identificationDocuments:
              - type: PERSID
                number: DE03043453453
            partOfCash:
              intendedUses:
                - ACQUPROP
                - ACQUESTA
                - CAPINVES
                - LOTTGAMB
              provenances:
                - SALEESTA
                - SALEPROP
                - LOTTERY
              cashDetails:
                - cashType: PROMNOTES
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
        companies:
          - involvements:
              - OWNER
            name: Dealings
            address:
              city: Brussels
              country: BE
            registrationNumber: BE34434343434
            registrationName: Banque Carrefour National
            registrationCountry: BE
            partOfCash:
              intendedUses:
                - ACQUPROP
                - REPAPERS
                - CAPINVES
              provenances:
                - SALEESTA
                - LABOPROF
              cashDetails:
                - cashType: GCOIN
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                  quantity: 10000000
                  weight: 9636800
                - cashType: TRAVCHEQUE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
          - involvements:
              - RECIP
            name: Travels Ltd
            address:
              city: New Delhi
              country: IN
            registrationNumber: IN232342342
            registrationName: Company Register India
            registrationCountry: IN
            partOfCash:
              intendedUses: []
              provenances: []
              cashDetails:
                - cashType: GCOIN
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
                  quantity: 10000000
                  weight: 9636800
                - cashType: TRAVCHEQUE
                  amount: 9636800
                  currency: EUR
                  amountEuro: 9636800
        totalCash:
          intendedUses:
            - ACQUPROP
            - REPAPERS
            - REPAINST
            - ACQUESTA
            - CAPINVES
            - LOTTGAMB
          provenances:
            - SALEESTA
            - SALEPROP
            - LOANPERS
            - LOANINST
            - INVESTPR
          cashDetails:
            - cashType: BANKNOTE
              amount: 9636800
              currency: EUR
              amountEuro: 9636800
            - cashType: COIN
              amount: 9636800
              currency: EUR
              amountEuro: 9636800
            - cashType: TRAVCHEQUE
              amount: 19273600
              currency: EUR
              amountEuro: 19273600
            - cashType: PROMNOTES
              amount: 9636800
              currency: EUR
              amountEuro: 9636800
            - cashType: GCOIN
              amount: 9636800
              currency: EUR
              amountEuro: 9636800
              quantity: 10000000
              weight: 9636800
        meansOfTransport:
          typeOfTransport: ROAD
          routings:
            - step: DEPART
              country: BE
              place: BEANT
              routingDate: '2021-03-01'
            - step: ARRIVA
              country: BE
              place: BEANT
              routingDate: '2021-03-14'
          nationality: AD
          licensePlate: AND2023232
          vehicleType: PRICAR
        customsDeclaration: false
        endorsedCopyRequested: false
        infraction:
          controlDate: '2021-03-01'
          incorrectDeclaration: true
          nonDeclaration: true
          cashNotAvailable: true
          belowThreshold: true
          criminalActivity: true
          euFinancialEffect: true
          detention: false
          remedy: false
          penaltyStarted: false
          concealmentType:
            - PERSSHOE
          concealmentDetails: In the shoes
          modusOperandi:
            - FALSVU
          modusOperandiDetails: Regular
          thirdCountry: false
    CashDeclarationCountRequest:
      value:
        criteria:
          nationalRef: Ref
          declarationType: DECLAR
          movementType: ENTERING
          businessId: DEC-BE-00
          declarationCountry: BE
          declarationDateFrom: '2021-11-01'
          publicationDateTo: '2021-11-15'
          lastUpdateDateFrom: '2021-11-01'
          lastUpdateDateTo: '2021-11-15'
          cashType: BANKNOTE
          meansOfTransport:
            - SEA
            - OTHER
          totalAmountEuroFrom: 100.01
          totalAmountEuroTo: 10000
          intendedUses:
            - REPAPERS
            - CAPINVES
            - OTHER
          provenances:
            - LOANPERS
            - LOANINST
            - OTHER
          companyCriteria:
            name: the recipient company
            city: another city name
            country: BE
            registrationNumber: '123456'
          personCriteria:
            firstName: John
            lastName: Doe
            nationality: BE
            city: the city name
            country: BE
            identificationNumber: '1234'
          routingCriteria:
            step: DEPART
            country:
              - BE
              - FR
          infractionCriteria:
            infraction: true
            incorrectDeclaration: true
            nonDeclaration: true
            cashNotAvailable: false
            criminalActivity: false
            detention: true
            penaltyStarted: true
            modusOperandi:
              - FALSVU
              - FALSEI
              - OTHER
            concealmentType:
              - PERSBODY
              - PERSSTUF
    CashDeclarationCountResponse:
      value:
        totalCount: 100
    LegacyCashDeclarationNew:
      value:
        customsOfficeRef: BE000001
        declarationType: DECLAR
        movementType: ENTERING
        nationalRef: Reference123456
        declarationDate: '2019-06-15'
        declarationPlace: Brussels
        persons:
          - involvements:
              - CARRIER
            firstName: John
            lastName: Doe
            nationality: BE
            gender: MALE
            dateOfBirth: '1980-01-01'
            placeOfBirth: the place of birth
            address:
              street: 'the street name, 123'
              postalCode: '1234'
              city: the city name
              country: BE
            phone: '123456789'
            email: john.doe@example.com
            identificationDocuments:
              - type: IDCARD
                number: '123456789'
                dateOfIssue: '1980-01-01'
                placeOfIssue: the place or country of issue
          - involvements:
              - OWNER
            firstName: Jack
            lastName: Smith
            nationality: BE
            gender: MALE
            dateOfBirth: '1990-01-01'
            placeOfBirth: the place of birth
            address:
              street: 'the street name, 123'
              postalCode: '1234'
              city: the city name
              country: BE
            phone: '123456789'
            email: jack.smith@example.com
            identificationDocuments:
              - type: IDCARD
                number: '123456789'
                dateOfIssue: '1990-01-01'
                placeOfIssue: the place or country of issue
            partOfCash:
              intendedUses:
                - REPAINST
              provenances:
                - LOANPERS
              cashDetails:
                - amount: 10000
                  amountEuro: 80000
                  currency: USD
                  cashType: BANKNOTE
                - amount: 40000
                  amountEuro: 80000
                  currency: USD
                  cashType: BAR
                  quantity: 1
                  weight: 1000
          - involvements:
              - OWNER
            firstName: Patti
            lastName: Jackson
            nationality: BE
            gender: FEMALE
            dateOfBirth: '1975-01-01'
            placeOfBirth: the place of birth
            address:
              street: 'the street name, 789'
              postalCode: '789'
              city: the city name
              country: BE
            phone: '123456123'
            email: patti.jackson@example.com
            identificationDocuments:
              - type: IDCARD
                number: '123456789'
                dateOfIssue: '1980-01-01'
                placeOfIssue: the place or country of issue
            partOfCash:
              intendedUses:
                - REPAINST
              provenances:
                - LOANPERS
              cashDetails:
                - amount: 15000
                  amountEuro: 80000
                  currency: EUR
                  cashType: BANKNOTE
        companies:
          - involvements:
              - RECIP
            name: the recipient company
            address:
              street: 'the street name, 456'
              postalCode: '7891'
              city: another city name
              country: BE
            registrationNumber: '123456'
            registrationName: Chamber of commerce
            registrationCountry: BE
            phone: '123456789'
            email: company@example.com
        totalCash:
          intendedUses:
            - REPAINST
          provenances:
            - LOANPERS
          cashDetails:
            - amount: 15000
              currency: EUR
              cashType: BANKNOTE
              amountEuro: 15000
            - amount: 10000
              currency: USD
              cashType: BANKNOTE
              amountEuro: 9000
            - amount: 40000
              currency: USD
              cashType: BAR
              amountEuro: 36000
              quantity: 1
              weight: 1000
        meansOfTransport:
          air:
            type: PASAIR
            flightNumber: '123456'
          routings:
            - step: DEPART
              country: CN
              routingDate: '2015-03-15'
              place: CNSHA
            - step: TRANSI
              country: HK
              routingDate: '2015-03-15'
              place: BEBRU
            - step: ARRIVA
              country: BE
              routingDate: '2015-03-16'
              place: BEANT
        customsDeclaration: false
        endorsedCopyRequested: false
        infraction:
          controlDate: '2015-03-16'
          incorrectDeclaration: false
          nonDeclaration: true
          cashNotAvailable: false
          belowThreshold: false
          criminalActivity: true
          euFinancialEffect: true
          detention: true
          remedy: false
          penaltyStarted: false
          modusOperandi: FALSEI
          concealmentType: PERSBODY
          thirdCountry: false
  securitySchemes:
    CisCashAuth:
      type: oauth2
      description: >-
        This API uses OAuth2 Client Credentials flow. While DPoP is currently
        supported, its use is discouraged for new integrations.For more details
        see 'AFIS B2B technical specifications'.
      flows:
        clientCredentials:
          tokenUrl: 'https://identity.olaf.europa.eu/sso/oauth2/afis/access_token'
          scopes:
            'cashdeclaration:create': Create cash declaration
            'cashdeclaration:read': >-
              Search and get cash declarations. The content of the search result
              is dependent of the client access right (MS Customs or MS FIU)
